<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        <!--2.内嵌式-->
        function show() {
            alert('show函数被调用了')
        }

        show()
    </script>
    <!-- 3.外联式写法-->
    <script src="js/demo1.js"></script>
</head>
<body>
<!--1.js行内写法-->
<button onclick="alert('点击了')">点击</button>
</body>
</html>
